home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / SYS / s / compress.mrbk < prev    next >
Text File  |  1996-09-26  |  2KB  |  80 lines

  1. /* compress.mrbk */
  2.  
  3. /* This demonstration script adjusts MRBackup's compression and decompression
  4.  * settings.
  5.  */
  6.  
  7. signal on ERROR
  8. signal on BREAK_C
  9.  
  10. options results
  11.  
  12. if ~(Show('P', 'MRBackup_#1')) then do
  13.     say "You must run MRBackup first. With a little work, you could"
  14.     say "get this ARexx script to do it for you."
  15.     exit 1
  16. end
  17.  
  18. address "MRBackup_#1"
  19.  
  20. poptofront
  21.  
  22. coptions = ""
  23. coptions.1 = "None"
  24. coptions.2 = "12-Bit"
  25. coptions.3 = "13-Bit"
  26. coptions.4 = "14-Bit"
  27. coptions.5 = "15-Bit"
  28. coptions.6 = "16-Bit"
  29.  
  30. /* trace all */
  31.  
  32. getcompression
  33. say "Current compression option: " || result
  34.  
  35. rc = 0
  36. 'setinfogadget "ARexx testing - cycling Compression and Decompression options."'
  37.  
  38. do i=1 to 6
  39.     say "i = " || i
  40.     say "coptions.i = " || coptions.i
  41.     
  42.     say "Setting compression to " || coptions.i
  43.     setcompression coptions.i
  44.     getcompression
  45.     if result ~= coptions.i then do
  46.         say "setcompression " || coptions.i " failed; rc = " || rc
  47.         exit rc
  48.     end
  49.     say "Setting decompression to " || coptions.i
  50.     setdecompression coptions.i
  51.     getdecompression
  52.     if result ~= coptions.i then do
  53.         say "setcompression " || coptions.i " failed; rc = " || rc
  54.         exit rc
  55.     end
  56.     call Delay(50)
  57. end i
  58.  
  59. 'setinfogadget "ARexx test complete."'
  60.  
  61. exit 0
  62.  
  63.  
  64. /*------------------------------------------------------------------*/
  65.  
  66. break_c:
  67.  
  68. say "*** Control-C recieved.  Stopped by user. ***"
  69. exit 5
  70.  
  71. /*------------------------------------------------------------------*/
  72.  
  73. error:
  74.  
  75. say "Error"
  76. exit 6
  77.  
  78. /*------------------------------------------------------------------*/
  79.  
  80.